package cn.doitedu.rtmk.demo7;

import cn.doitedu.rtmk.common.EventBean;
import org.apache.flink.api.common.functions.RuntimeContext;
import org.apache.flink.util.Collector;
import org.roaringbitmap.longlong.Roaring64Bitmap;

import java.io.IOException;

public interface RuleCalculator {

    /**
     * 规则运算机对象的初始化方法
     * @param runtimeContext
     */
    void init(RuntimeContext runtimeContext, String ruleParamJsonStr, Roaring64Bitmap preSelectUsersBitmap) throws IOException;


    /**
     * 规则逻辑核心处理方法
     * @param eventBean
     * @param collector
     */
    void calc(EventBean eventBean, Collector<String> collector) throws IOException;


}
